Added consistency checker#14402
Conversation
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
vaibhavhd
left a comment
There was a problem hiding this comment.
Non blocking comments added.
|
|
||
| if self._python3_pysairedis_download_url is not None: | ||
| # Install python3-sairedis in syncd container | ||
| self._duthost.shell((f"docker exec {SYNCD_CONTAINER} bash -c " |
There was a problem hiding this comment.
DEB installation failures are not caught and not logged.
There was a problem hiding this comment.
The kwarg module_ignore_errors kwarg is implicitly False here. So if the deb installation fails an error will be raised with the failing command. I don't think we should catch and log and continue.
tests/common/fixtures/consistency_checker/consistency_checker.py
Outdated
Show resolved
Hide resolved
tests/common/fixtures/consistency_checker/consistency_checker.py
Outdated
Show resolved
Hide resolved
tests/common/fixtures/consistency_checker/consistency_checker.py
Outdated
Show resolved
Hide resolved
| finally: | ||
| uninitialize_sai_api() | ||
|
|
||
| print(json.dumps(results)) |
There was a problem hiding this comment.
This will print to stdout. Why is logger not used?
| logger.info("Initializing SAI API") | ||
| profileMap = dict() | ||
| profileMap[pysairedis.SAI_REDIS_KEY_ENABLE_CLIENT] = "true" | ||
| status = pysairedis.sai_api_initialize(0, profileMap) |
There was a problem hiding this comment.
Checking for pysairedis - is 0 for flags which should be zero as per sai spec?
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
36b6e1c to
ce433ae
Compare
tests/common/fixtures/consistency_checker/consistency_checker.py
Outdated
Show resolved
Hide resolved
tests/common/fixtures/consistency_checker/consistency_checker.py
Outdated
Show resolved
Hide resolved
tests/common/fixtures/consistency_checker/query-asic/query-asic.py
Outdated
Show resolved
Hide resolved
bf8d1d3 to
f0aeb36
Compare
|
hi @Ryangwaite could you confirm this is tested with 202311 and 202405 branch for cherry pick? Would like to avoid regression. |
What is the motivation for this PR? There was a test gap discovered where the ASIC_DB and ASIC itself were inconsistent after an upgrade resulting in traffic being dropped. How did you do it? Created a python fixture called consistency_checker_provider that can be injected into any test and used to call the consistency_checker utility. How did you verify/test it? Tested on an internal A->B upgrade scenario. Any platform specific information? Currently only supports Arista x86_64-arista_7060_cx32s and x86_64-arista_7260cx3_64 platforms and versions 202305 and 202311. The ConsistencyCheckerProvider.is_consistency_check_supported will return True for a supported combination. Other platforms and versions may very well work they just haven't been tested yet. To try, simply ignore the result of is_consistency_check_supported and carry on with the test.
What is the motivation for this PR? There was a test gap discovered where the ASIC_DB and ASIC itself were inconsistent after an upgrade resulting in traffic being dropped. How did you do it? Created a python fixture called consistency_checker_provider that can be injected into any test and used to call the consistency_checker utility. How did you verify/test it? Tested on an internal A->B upgrade scenario. Any platform specific information? Currently only supports Arista x86_64-arista_7060_cx32s and x86_64-arista_7260cx3_64 platforms and versions 202305 and 202311. The ConsistencyCheckerProvider.is_consistency_check_supported will return True for a supported combination. Other platforms and versions may very well work they just haven't been tested yet. To try, simply ignore the result of is_consistency_check_supported and carry on with the test.
What is the motivation for this PR? There was a test gap discovered where the ASIC_DB and ASIC itself were inconsistent after an upgrade resulting in traffic being dropped. How did you do it? Created a python fixture called consistency_checker_provider that can be injected into any test and used to call the consistency_checker utility. How did you verify/test it? Tested on an internal A->B upgrade scenario. Any platform specific information? Currently only supports Arista x86_64-arista_7060_cx32s and x86_64-arista_7260cx3_64 platforms and versions 202305 and 202311. The ConsistencyCheckerProvider.is_consistency_check_supported will return True for a supported combination. Other platforms and versions may very well work they just haven't been tested yet. To try, simply ignore the result of is_consistency_check_supported and carry on with the test.
What is the motivation for this PR? There was a test gap discovered where the ASIC_DB and ASIC itself were inconsistent after an upgrade resulting in traffic being dropped. How did you do it? Created a python fixture called consistency_checker_provider that can be injected into any test and used to call the consistency_checker utility. How did you verify/test it? Tested on an internal A->B upgrade scenario. Any platform specific information? Currently only supports Arista x86_64-arista_7060_cx32s and x86_64-arista_7260cx3_64 platforms and versions 202305 and 202311. The ConsistencyCheckerProvider.is_consistency_check_supported will return True for a supported combination. Other platforms and versions may very well work they just haven't been tested yet. To try, simply ignore the result of is_consistency_check_supported and carry on with the test.
Description of PR
Summary:
Added a new consistency checker utility that compares the values in the ASIC_DB with the values in the ASIC itself. It's initially integrated with
test_upgrade_path.py.It works by sending and receiving get request/responses to/from syncd via redis and pysairedis. To enable this, the following patches were made in dependent repositories:
Due to policies around backporting and merging changes to certain mainline branches, we can't merge the above changes in all cases. To support these, there are two flags
--consistency_checker_libsairedis_url_templateand--consistency_checker_python3_pysairedis_url_templatewhere a templated URL may be provided to download libsairedis and python3-pysairedis debs that have been compiled for the test to be installed on the device.This is an opt-in check and will only run if the
--enable_consistency_checkerhas been provided.Type of change
Back port request
Approach
What is the motivation for this PR?
There was a test gap discovered where the ASIC_DB and ASIC itself were inconsistent after an upgrade resulting in traffic being dropped.
How did you do it?
Created a python fixture called
consistency_checker_providerthat can be injected into any test and used to call the consistency_checker utility.How did you verify/test it?
Tested on an internal A->B upgrade scenario.
Any platform specific information?
Currently only supports Arista x86_64-arista_7060_cx32s and x86_64-arista_7260cx3_64 platforms and versions 202305 and 202311. The
ConsistencyCheckerProvider.is_consistency_check_supportedwill return True for a supported combination. Other platforms and versions may very well work they just haven't been tested yet. To try, simply ignore the result ofis_consistency_check_supportedand carry on with the test.Supported testbed topology if it's a new test case?
Documentation
Will be added in a follow-up PR.